//--------------------------------------------------------------
//
// Qizhi Zhang 
// ezhung@gmail.com
// http://www.moorwind.com
//
//--------------------------------------------------------------
package reader.model
{
	import __AS3__.vec.Vector;
	
	import reader.model.vo.BlogFetchVO;
	import reader.model.vo.BlogItemVO;
	import reader.model.vo.BlogLabelVO;
	import reader.model.vo.BlogSourceVO;
	
	public interface IDataProxy extends IBaseDataProxy
	{
		/**  
		 * fetch blog labels and subscribe feed for creating labeltree xml.
		*/
		function getLabels():void;
		
		/**  
		 * start auto update blog item from given subscribe.
		*/
		function startAutoUpdateBlogItem():void;
		
		/**  
		 * stop auto update blog item from given subscribe.
		*/
		function stopAutoUpdateBlogItem():void;
		/**  
		 * creat a new label.
		 * @param label details of BlogLabelVO that will insert into database.
		 * @param blogSource subscribe feeds that will apply  to the created label-id.
		*/
		function addLabel(label:BlogLabelVO, blogSource:BlogSourceVO = null):void;
		
		/**  
		 * remove the given label.
		 * @param label BlogLabelVO that will delete from database.
		*/
		function removeLabel(label:BlogLabelVO):void;
		
		/**  
		 * remove given labels.
		 * @param labels array of BlogLabelVOs that will delete from database.
		*/
		function removeLabels(labels:Vector.<BlogLabelVO>):void;
		
		/**  
		 * remove this given labels.
		 * @param label array of BlogSourceVO that will delete from database.
		*/
		function removeSubscribes(blogSources:Vector.<BlogSourceVO>):void;
		/**  
		 * fetch latest blogs for creating blogsummary box.
		*/
		function getBlogSummary():void;
		
		/**  
		 * update the given subscribe feed.
		*/
		function updateBlogSource(blogSource:BlogSourceVO):void;
		
		/**  
		 * update given list of subscribe feeds label to the labelid.
		*/
		function updateBlogSourceLabel(blogSource:Vector.<BlogSourceVO>, labelid:int):void
		
		/**  
		 * add a new subscribe.
		 * @param blogSource details of BlogSourceVO that will insert into database.
		 * @param isQuickAdd if true, add a deleted BlogSourceVO into database again.
		*/
		function addSubscribe(blogSource:BlogSourceVO, isQuickAdd:Boolean = false):void;
		
		/**  
		 * add list of subscribes.
		 * @param list list of subscribes.
		 * @param label label information for the given subscribes.
		*/
		function addListSubscribe(list:Vector.<BlogSourceVO>, label:BlogLabelVO):void
		
		/**  
		 * remove the given subscribe.
		*/
		function removeSubscribe(blogSource:BlogSourceVO):void;
		
		/**  
		 * fetch blogs by given BlogFetchVO.
		*/
		function fetchBlogs(blogfetch:BlogFetchVO):void;
		
		/**  
		 * search blogs by given keywords.
		*/
		function searchBlog(keywords:String, blogfetch:BlogFetchVO):void;
		/**  
		 * update blog item by given BlogItemVO.
		*/
		function readItem(value:BlogItemVO):void;
		
		/**  
		 * update blog items isRead property, set to true.
		*/
		function readAllItems(value:Vector.<BlogItemVO>):void;
		
		/**  
		 * fetch all subscribes that stared.
		*/
		function getStarItems():void;
		
		/**  
		 * fetch all subscribes.
		*/
		function getAllItems():void;
				
		/**  
		 * update blog item, set isStar, isKeepUnRead, etc.
		*/
		function updateBlogItem(value:BlogItemVO):void;
			
		/**  
		 * get total number of items.
		*/
		function getCount():void;
		
		/**  
		 * delete given user.
		*/
		function deleteAccount():void;
	}
}